<?php
/*
 * INSERT INTO  `bbs`.`t_message` (
`id` ,
`username` ,
`sex` ,
`content` ,
`avater` ,
`time_at`
)
VALUES (
NULL ,  '阳',  '男',  '该如何？',  'images/2.jpg',  ''
);

 */
header("content-type:text/html;cahrset=uft-8");
require_once '../db_conn.php';
$conn;

$username=$_POST['username'];
$sex=$_POST['sex'];
$message=$_POST['message'];
$imgurl=$_POST['imgurl'];
$time_at=time();

$sql=" 
INSERT INTO  `bbs`.`t_message` (
`id` ,
`username` ,
`sex` ,
`content` ,
`avater` ,
`time_at`
)
VALUES (
NULL ,  '$username',  '$sex',  '$message',  '$imgurl',  '$time_at'
);
";
$result=$conn->query($sql);
if ($result===false){
    echo "0";
}
header("location:../index1017.php");